/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.gwc.yy.liuxue.service;

import java.util.List;
import java.util.UUID;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.modules.sys.entity.User;
import com.gwc.yy.liuxue.entity.Remind;
import com.gwc.yy.liuxue.dao.RemindDao;

/**
 * 提醒Service
 * @author 黎俊涛
 * @version 2017-04-13
 */
@Service
@Transactional(readOnly = true)
public class RemindService extends CrudService<RemindDao, Remind> {

	public Remind get(String id) {
		return super.get(id);
	}
	
	public List<Remind> findList(Remind remind) {
		return super.findList(remind);
	}
	
	public List<Remind> findListByUser(User user){
		System.out.println(user.getId()+"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");
		return dao.findListByUser(user);
	}
	
	public Page<Remind> findPage(Page<Remind> page, Remind remind) {
		return super.findPage(page, remind);
	}
	
	@Transactional(readOnly = false)
	public void save(Remind remind) {
		super.save(remind);
	}
	
	@Transactional(readOnly = false)
	public void delete(Remind remind) {
		super.delete(remind);
	}

	public List<User> findStudentList(String id) {
		return dao.findStudentList(id);
	}
	@Transactional(readOnly = false)
	public void save(Remind remind, String[] student_ids) {
		System.out.println(student_ids.length+"-------------------------------------------------");
		//remind.getUser().setIsNewRecord(true);
		super.save(remind,student_ids);
	
	}
	
}